if exists (select name from sysobjects where name like 'Proc_ChiTietLSVay_GetById')
	drop procedure Proc_ChiTietLSVay_GetById
go

create PROC Proc_ChiTietLSVay_GetById (@maLSVay int )
as
	select * from ChiTietLSVay
	where @maLSVay= ChiTietLSVay.MaLSVay
go

Exec Proc_ChiTietLSVay_GetById 1
go
--------------------------------------
if exists (select name from sysobjects where name like 'Proc_ChiTietLSVay_GetByMaNgayVDLS')
	drop procedure Proc_ChiTietLSVay_GetByMaNgayVDLS
go

create PROC Proc_ChiTietLSVay_GetByMaNgayVDLS (@maNgayVDLS nvarchar )
as
	select * from ChiTietLSVay
	where @maNgayVDLS= ChiTietLSVay.MaNgayVDLS
go
--------------------------------------------
if exists (select name from sysobjects where name like 'Proc_ChiTietLSVay_GetByMaKH')
	drop procedure Proc_ChiTietLSVay_GetByMaKH
go

create PROC Proc_ChiTietLSVay_GetByMaKH (@maKH nvarchar )
as
	select * from ChiTietLSVay
	where @maKH= ChiTietLSVay.MaKH
go